﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using BaBaoFan.Modifier.Models;
using BaBaoFan.Modifier.Data;
using BaBaoFan.Modifier.Service;
using Microsoft.Extensions.Caching.Memory;

namespace BaBaoFan.Modifier.Controllers
{
    public class HomeController : Controller
    {
        IAlgorithmInfoService _algorithmInfoService;
        public HomeController(IAlgorithmInfoService algorithmInfoService, IMemoryCache memoryCache) 
        {
            _algorithmInfoService = algorithmInfoService;
        }
        public IActionResult Index()
        {
            return Redirect("/AlgorithmInfo/List");
        }

        public IActionResult About()
        {
            ViewData["Message"] = "Your application description page.";

            return View();
        }

        public IActionResult Contact()
        {
            ViewData["Message"] = "Your contact page.";

            return View();
        }

        public IActionResult Error()
        {
            return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
        }
    }
}
